/*
 * @Description: xxx描述文件内容
 * @Autor: gufuyan
 * @Date: 2021-11-12 09:08:05
 * @lastModifiedBy: gufuyan
 * @LastEditTime: 2021-11-24 09:00:12
 * @lastModifiedContent: xxx描述修改的内容
 */
/**
 * 在生产环境 代理是无法生效的，所以这里没有生产环境的配置
 * The agent cannot take effect in the production environment
 * so there is no configuration of the production environment
 * For details, please see
 * https://pro.ant.design/docs/deploy
 */
 import * as env from './env';

 const defCon = {
   dev: {},
   test: {},
   pre: {},
 };

 defCon.dev[`${env.CONTEXT ? '/' + env.CONTEXT : ''}/api/`] = {
   target: env.URL_DEV,
   changeOrigin: true,
   pathRewrite: { '^': '' },
 };
 defCon.dev[`${env.CONTEXT_DATACENTER ? '/' + env.CONTEXT_DATACENTER : ''}/api/`] = {
   target: env.URL_DEV,
   changeOrigin: true,
   pathRewrite: { '^': '' },
 };
 defCon.dev[`${env.BPM_CONTEXT ? '/' + env.BPM_CONTEXT : ''}/api/`] = {
   target: env.URL_DEV,
   changeOrigin: true,
   pathRewrite: { '^': '' },
 };

 defCon.test[`/${env.CONTEXT}/api/`] = {
   target: env.URL_TEST,
   changeOrigin: true,
   pathRewrite: { '^': '' },
 };

 defCon.pre[`/${env.CONTEXT}/api/`] = {
   target: env.URL_PRE,
   changeOrigin: true,
   pathRewrite: { '^': '' },
 };

 defCon.pre[`${env.BPM_CONTEXT ? '/' + env.BPM_CONTEXT : ''}/api/`] = {
   target: env.URL_BPM,
   changeOrigin: true,
   pathRewrite: { '^': '' },
 };

 export default defCon;
